package com.yl.googleplayer_yl.fragment;

import android.support.v4.app.Fragment;

/**
 * Created by Administrator on 2016/10/30 0030.
 */
public class FragmentFactory {

    public static Fragment create(int position) {
        Fragment fragment=null;
        switch (position) {
          case 0://首页
              fragment= new HomeFragment();
            break;
            case 1://应用
                fragment= new AppFragment();
                break;
            case 2://游戏
                fragment= new GameFragment();
                break;
            case 3://专题
                fragment= new SubjectFragment();
                break;
            case 4://推荐
                fragment= new RecommondFragment();
                break;
            case 5://分类
                fragment= new CatagoryFragment();
                break;
            case 6://热门
                fragment= new HotFragment();
                break;
        }
        return fragment;

    }
}
